<template>
  <div class="content-card" :class="cls">
        <div class="card-image" :style="{ backgroundImage: `url(${item.image})` }">
          <div class="card-overlay">
            <h3 class="card-title">{{ item.title }}</h3>
          </div>
        </div>
      </div>
</template>
<script setup>
import {defineProps } from "vue";
const props = defineProps({
  item: {
    type: Object,
    default: {}
  },
  cls: {
    type: String,
    default: ''
  },
});
</script>
<style lang='scss' scoped>
.content-card {
      background: rgba(255, 255, 255, 0.05);
      border-radius: 8px;
      overflow: hidden;
      cursor: pointer;
      transition: all 0.3s ease;
      border: 1px solid rgba(255, 255, 255, 0.1);
      position: relative;
     &.active{
        border: 2px solid RGBA(227, 66, 52, 1);
        .checked{
        display: block;
        }
    }
    .checked{
        display: none;
        position: absolute;
        right: 15px;
        top: 135px;
        width: 30px;
        height: 30px;
    }
      &:hover {
        transform: translateY(-4px);
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
        border-color: rgba(255, 255, 255, 0.2);
      }

      .card-image {
        width: 100%;
        height: 223px;
        border-radius: 10px;
        background-size: cover;
        background-position: center;
        background-repeat: no-repeat;
        position: relative;
        background-color: #2a2a2a;

        .card-overlay {
          position: absolute;
          display: flex;
          flex-direction: column;
          justify-content: flex-end;
          top: 0;
          bottom: 0;
          left: 0;
          right: 0;
          background: rgba(0, 0, 0, 0.4);
          padding: 20px 16px 16px;

          .card-title {
            color: #fff;
            font-size: 16px;
            font-weight: 600;
            margin: 0;
            display: -webkit-box;
            -webkit-line-clamp: 3;
            line-clamp: 3;
            -webkit-box-orient: vertical;
            overflow: hidden;
          }
        }
      }
    }
</style>